﻿namespace EyeOpen.Data.EntityFramework
{
	using System.Data.Entity;
	using System.Data.Entity.ModelConfiguration.Conventions;
	using EyeOpen.Domain;

	public class FinancialDbContext 
		: DbContext
	{
		public FinancialDbContext(string nameOrConnectionString)
			: base(nameOrConnectionString)
		{
		}

		public IDbSet<Customer> CustomerSet
		{
			get { return Set<Customer>(); }
		}

		public IDbSet<Order> OrderSet
		{
			get { return Set<Order>(); }
		}

		protected override void OnModelCreating(DbModelBuilder modelBuilder)
		{
			modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
		}
	}
}